<template>
    <div class="table_header">
        <div class="table_header_btn_group">
            <el-button v-auth="'classify:add'" type="primary" @click="$emit('add')" :disabled="props.isParentDisabled">
                新增分组
            </el-button>
        </div>
        <div class="table_header_label">
            <div class="table_header_label_left">分组</div>
            <div class="table_header_label_right">操作</div>
        </div>
    </div>
</template>

<script setup>
const props = defineProps({
    isParentDisabled: { type: Boolean, default: false }
});
</script>

<style lang="scss" scoped>
.table_header {
    .table_header_btn_group {
        margin-bottom: 16px;
    }
    .table_header_label {
        display: flex;
        justify-content: space-between;
        height: 48px;
        line-height: 48px;
        padding: 0 24px;
        border: 1px solid #ebeef5;
        border-bottom: none;
        background: #f9f9f9;
        font-size: 14px;
        font-family: PingFangSC-Medium, PingFang SC;
        font-weight: 500;
        color: #33302d;
        .table_header_label_right {
            width: 205px;
            text-align: center;
        }
    }
}
</style>
